//
//  DingWeiView.m
//  TravelYo
//
//  Created by lanou3g on 15/10/30.
//  Copyright © 2015年 TravelYo. All rights reserved.
//

#import "DingWeiView.h"

@interface DingWeiView ()

@property (nonatomic, assign) CGFloat selfWidth;

@property (nonatomic, assign) CGFloat selfHeight;


@end



@implementation DingWeiView



- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _selfWidth = frame.size.width;
        _selfHeight = frame.size.height;
        [self addSubViews];
    }
    return self;
}

- (void)addSubViews
{
    _dingweiLB = [[UILabel alloc] initWithFrame:CGRectMake(0, 5, (_selfWidth * 2) / 3, _selfHeight - 10)];
    _dingweiLB.text = @"当前位置: 中国北京·大帝都";
    _dingweiLB.textColor = kMainColor;
    [self addSubview:_dingweiLB];
    
    _dingweiBT = [UIButton buttonWithType:(UIButtonTypeCustom)];
    _dingweiBT.frame = CGRectMake((_selfWidth * 4) / 5, 10, _selfWidth / 5 - 20, _selfHeight - 20);
    _dingweiBT.layer.cornerRadius = 20;
    _dingweiBT.backgroundColor = kMainColor;
    [_dingweiBT setTitle:@"定位" forState:(UIControlStateNormal)];
    [_dingweiBT setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
    [self addSubview:_dingweiBT];
    
    
}





/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
